<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link rel="stylesheet" href="./../../assets/css/combined.css">
	<link rel="shortcut icon" href="./../../favicon.ico" />
	<script src="http://www.google.com/jsapi" type="text/javascript"></script>
	<script type="text/javascript">
		var path = './../../';
	</script>
	<script src="./../../assets/js/combined.js"></script>
	<title>File Intro - Classes - FuelPHP Documentation</title>
</head>
<body>
	<div id="container">
		<header id="header">
			<div class="table">
				<h1>
					<strong>FuelPHP, a PHP 5.3 Framework</strong>
					Documentation
				</h1>

				<form id="google_search">
					<p>
						<span id="search_clear">&nbsp;</span>
						<input type="submit" name="search_submit" id="search_submit" value="search" />
						<input type="text" value="" id="search_input" name="search_input" />
					</p>
				</form>
			</div>
			<nav>

				<div class="clear"></div>
			</nav>
			<a href="#" id="toc_handle">table of contents</a>
			<div class="clear"></div>
		</header>

		<div id="cse">
			<div id="cse_point"></div>
			<div id="cse_content"></div>
		</div>

		<div id="main">

			<h2>File Class</h2>

			<section>

				<h3 id="intro">Introduction</h3>

				<p>
					The File class offers a set of methods for working with files &amp; directories. This can
					be done through some helper methods or through a more advanced object oriented method where
					all files and directories are wrapped in objects.
				</p>

			</section>

			<section>
				<h3 id="configuration">Configuration</h3>

				<p>
					The File class is highly configurable and gives you all the control you need over the behaviour
					supplied by the class. Configuration settings vary from restricting filesystem access to setting
					drivers by filetype.
				</p>

				<p>
					The default file config is located at <em>core/config/file.php</em>. To change these settings
					create a config file with your own settings at <em>app/config/file.php</em>.
				</p>

				<p>
					The following configuration values can be defined:
				</p>

				<table class="config">
					<tbody>
						<tr class="header">
							<th>Param</th>
							<th>Type</th>
							<th>Default</th>
							<th>Description</th>
						</tr>
						<tr>
							<th>basedir</th>
							<td>string</td>
							<td><pre class="php"><code>null</code></pre></td>
							<td>
								The path to the basedir. Defaults to <em>null</em> for no restrictions.
								When defined this will restrict the access to that specific directory.
							</td>
						</tr>
						<tr>
							<th>extensions</th>
							<td>array</td>
							<td><pre class="php"><code>null</code></pre></td>
							<td>
								Array of allowed extensions, null for all.
								If defined the File class will only handle the given extentions and
								filter out the rest.
							</td>
						</tr>
						<tr>
							<th>url</th>
							<td>string</td>
							<td><pre class="php"><code>null</code></pre></td>
							<td>
								Base url for files, null for not available.
							</td>
						</tr>
						<tr>
							<th>use_locks</th>
							<td>null</td>
							<td><pre class="php"><code>null</code></pre></td>
							<td>
								Whether to use file locks. Set to <em>true</em> if you want the File class to use them.
							</td>
						</tr>
						<tr>
							<th>file_drivers</th>
							<td>array</td>
							<td><pre class="php"><code>array</code></pre></td>
							<td>
								Array of file drivers per extension. These allow you to use custom drivers on a by filetype basis.
							</td>
						</tr>
						<tr>
							<th>magic_file</th>
							<td>string</td>
							<td><pre class="php"><code>null</code></pre></td>
							<td>
								Alternative location of the fileinfo() magic file. If not specified, the system default will be used.
							</td>
						</tr>
					</tbody>
				</table>

			</section>

		</div>

		<footer>
			<p>
				&copy; FuelPHP Development Team 2010-2013 - <a href="http://fuelphp.com">FuelPHP</a> is released under the MIT license.
			</p>
		</footer>
	</div>
</body>
</html>
